package edu.fim.presentation.model;

import java.util.HashSet;
import java.util.Observable;
import java.util.Set;

import edu.fim.presentation.model.bean.Food;


public class Menu extends Observable {

	private Set<Food> foods;
	
	public Menu() {
		foods = new HashSet<>();
	}

	public void add(Food food) {
		foods.add(food);
	}

	public void remove(int index) {
		foods.remove(index);
	}

	public void remove(Food food) {
		foods.remove(food);
	}
	
	public boolean contains(Food food) {
		return foods.contains(food);
	}
	
	public Food[] getFoods() {
		Food[] foodArray = new Food[foods.size()];
		return foods.toArray(foodArray);
	}
}